package com.jinlejia.bbs.bean.base;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;

/**
 * 社区用户信息
 *
 * @author 王进 on 2019/3/5.
 */

public class BBSUserBean implements Parcelable{
    private String userPin;     //用户PIN-ID
    private String userName;   //姓名
    private String gender;      //性别
    private String userAvatar; //头像全路径
    private String userAddress;//地址
    private int userLevel;     //用户等级
    private String birthday;    //出生年份
    private String deptName;    //部门名称
    private String userDuty;    //用户职务
    private int answerCount;    //本月回答话题数
    private int attitudesCount; //获赞数量
    private int attentionCount; //关注数量
    private int attentionedCount;//被关注数量-粉丝数量
    private String ofShop;      //所属门店
    private int collectCount;   //收藏话题的受凉
    private int attentionType;  //关注类型 0:未关注 1：已关注 2：互相关注
    private boolean isSelf; //是否是本人 true 是 false 不是
    private ArrayList<TagBean> tags; //所包含的标签
    public BBSUserBean(){

    }
    protected BBSUserBean(Parcel in) {
        userPin = in.readString();
        userName = in.readString();
        gender = in.readString();
        userAvatar = in.readString();
        userAddress = in.readString();
        userLevel = in.readInt();
        birthday = in.readString();
        deptName = in.readString();
        userDuty = in.readString();
        answerCount = in.readInt();
        attitudesCount = in.readInt();
        attentionCount = in.readInt();
        attentionedCount = in.readInt();
        ofShop = in.readString();
        collectCount = in.readInt();
        attentionType = in.readInt();
        isSelf = in.readByte() != 0;
        tags = in.createTypedArrayList(TagBean.CREATOR);
    }

    public static final Creator<BBSUserBean> CREATOR = new Creator<BBSUserBean>() {
        @Override
        public BBSUserBean createFromParcel(Parcel in) {
            return new BBSUserBean(in);
        }

        @Override
        public BBSUserBean[] newArray(int size) {
            return new BBSUserBean[size];
        }
    };

    public ArrayList<TagBean> getTags() {
        return tags;
    }

    public void setTags(ArrayList<TagBean> tags) {
        this.tags = tags;
    }

    public int getAttentionType() {
        return attentionType;
    }

    public boolean isSelf() {
        return isSelf;
    }

    public void setSelf(boolean self) {
        isSelf = self;
    }

    public void setAttentionType(int attentionType) {
        this.attentionType = attentionType;
    }

    public String getOfShop() {
        return ofShop;
    }

    public int getCollectCount() {
        return collectCount;
    }

    public void setCollectCount(int collectCount) {
        this.collectCount = collectCount;
    }

    public void setOfShop(String ofShop) {
        this.ofShop = ofShop;
    }

    public String getBirthday() {
        return birthday;
    }

    public void setBirthday(String birthday) {
        this.birthday = birthday;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public int getAttitudesCount() {
        return attitudesCount;
    }

    public void setAttitudesCount(int attitudesCount) {
        this.attitudesCount = attitudesCount;
    }

    public String getDeptName() {
        return deptName;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    public int getAttentionCount() {
        return attentionCount;
    }

    public void setAttentionCount(int attentionCount) {
        this.attentionCount = attentionCount;
    }

    public int getAttentionedCount() {
        return attentionedCount;
    }

    public void setAttentionedCount(int attentionedCount) {
        this.attentionedCount = attentionedCount;
    }

    public String getUserPin() {
        return userPin;
    }

    public void setUserPin(String userPin) {
        this.userPin = userPin;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserAvatar() {
        return userAvatar;
    }

    public void setUserAvatar(String userAvatar) {
        this.userAvatar = userAvatar;
    }

    public String getUserAddress() {
        return userAddress;
    }

    public void setUserAddress(String userAddress) {
        this.userAddress = userAddress;
    }

    public int getUserLevel() {
        return userLevel;
    }

    public void setUserLevel(int userLevel) {
        this.userLevel = userLevel;
    }

    public String getUserDuty() {
        return userDuty;
    }

    public void setUserDuty(String userDuty) {
        this.userDuty = userDuty;
    }

    public int getAnswerCount() {
        return answerCount;
    }

    public void setAnswerCount(int answerCount) {
        this.answerCount = answerCount;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(userPin);
        dest.writeString(userName);
        dest.writeString(gender);
        dest.writeString(userAvatar);
        dest.writeString(userAddress);
        dest.writeInt(userLevel);
        dest.writeString(birthday);
        dest.writeString(deptName);
        dest.writeString(userDuty);
        dest.writeInt(answerCount);
        dest.writeInt(attitudesCount);
        dest.writeInt(attentionCount);
        dest.writeInt(attentionedCount);
        dest.writeString(ofShop);
        dest.writeInt(collectCount);
        dest.writeInt(attentionType);
        dest.writeByte((byte) (isSelf ? 1 : 0));
        dest.writeTypedList(tags);
    }
}
